package info.techgeek.labs.patterns.abstractFactoryPattern;

import java.rmi.*;

public class Client {
	public static void main(String[] args){
		try {
			WidgetFactory factory = (WidgetFactory)
				Naming.lookup("rmi://"+ args[0] + "/WidgetFactory");
			System.out.println("Window: "+factory.createWindow());
			System.out.println("ScrollBar: "+factory.createScrollBar());
		} catch(Exception e){
			e.printStackTrace();
			System.err.println("Failure creating widgets: "
				+ e.getMessage());
		}
	}
}
